# -*- coding: utf-8 -*-
import numpy as n, pylab as p
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.axes3d as p3

mpl.rcParams['legend.fontsize'] = 10


ch1=n.loadtxt("chute_out-sim-1.15-.2.dat")
ch2=n.loadtxt("chute_out-sim-.47-.1.dat")
ch3=n.loadtxt("chute_out-nao-.2-.2-0.0005.dat")


fig = plt.figure()
#ax = fig.gca(projection='3D')
ax = p3.Axes3D(fig)

ax.plot(ch1[:,0],ch1[:,1],ch1[:,2], label = r"$\theta=1.15, \phi = 0.2$")
ax.plot(ch2[:,0],ch2[:,1],ch2[:,2], label = r"$\theta=.47, \phi=0.1$")
ax.plot(ch3[:,0],ch3[:,1],ch3[:,2], label = r"$\theta=.2, \phi=.2$")
ax.set_xlabel(r'X $(m)$')
ax.set_ylabel(r'Y $(m)$')
ax.set_zlabel(r'Z $(m)$')
ax.legend()

#p.plot(ch1[:,0],ch1[:,1],label=r"$\theta=1.15, \phi = 0.2$")
#p.plot(ch2[:,0],ch2[:,1],label=r"$\theta=.47, \phi=0.1$")
#p.plot(ch3[:,0],ch3[:,1],label=r"$\theta=1.5, \phi=.4$")

#p.plot([40,40],[4,10],lw=5,color="black", label=u"É o Goal!")
#p.legend(loc=2)
p.title(u"Três chutes. Dois goals e um bem torto.")
#p.xlabel(r"x $(m)$")
#p.ylabel(r"y $(m)$")
p.show()